package com.shanglv.train.service.demo;



import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import com.shanglv.dto.flight.demo.DemoDto;

@Path("demos")
public interface DemoService {
	
	@POST
    @Path("/add")
    @Consumes(MediaType.APPLICATION_XML)
	@Produces(MediaType.APPLICATION_XML)
    public Response addDemo(DemoDto demo);
	
	@DELETE
	@Path("/{id}")
    @Consumes(MediaType.APPLICATION_XML)
	@Produces(MediaType.APPLICATION_XML)
    public Response deleteDemo(@PathParam("id") Integer id);
	
	@PUT
	@Path("/update")
    @Consumes(MediaType.APPLICATION_XML)
    @Produces(MediaType.APPLICATION_XML)
    public Response updateDemo(DemoDto demo);


    @GET
    @Path("/{id}")
    @Produces({MediaType.APPLICATION_XML})
    public Response getDemo(@PathParam("id") Integer id);
}